<?php

declare (strict_types=1);

namespace app\common\model\agent;

use app\common\model\User;
use cores\BaseModel;
use think\model\relation\HasOne;

/**
 * 用户绑定日志
 * Class User
 * @package app\common\model
 */
class BindLog extends BaseModel
{
    // 定义表名
    protected $name = 'agent_bind_log';

    // 定义主键
    protected $pk = 'id';


    /**
     * 推广用户
     * @return HasOne
     */
    public function promoterUser(): HasOne
    {
        return $this->hasOne(User::class,'user_id','promoter_user_id');
    }


}
